﻿// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace Microsoft.DocAsCode
{
    using System.IO;

    internal static class StringExtensions
    {
        internal static string GetFullFilePath(this string filePath, string baseDirectory)
        {
            if (string.IsNullOrEmpty(filePath) || Path.IsPathRooted(filePath))
            {
                return filePath;
            }

            return Path.Combine(baseDirectory, filePath);
        }
    }
}
